package com.secretsanta.generate;

import com.google.common.collect.Sets;
import com.secretsanta.domain.User;
import org.junit.Test;

import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * Created by Shannon on 11/16/2014.
 */
public class SantaAssignerTest {
    SantaAssigner santaAssigner = new SantaAssigner();
    @Test
    public void testAssignment() {
        User parker = new User("Parker", "parkert", 1, "email", "phone");
        User cody = new User("Cody", "codyt", 2, "email", "phone");
        User stephani = new User("Stephani", "stepht", 3, "email", "phone");
        User sara = new User("Sara", "sarat", 4, "email", "phone");
        parker.setUserBlacklist(Sets.newHashSet(cody));
        cody.setUserBlacklist(Sets.newHashSet(parker));
        stephani.setUserBlacklist(Sets.newHashSet(sara));
        sara.setUserBlacklist(Sets.newHashSet(stephani));
        Set<User> users = new HashSet<User>();
        users.add(parker);
        users.add(cody);
        users.add(stephani);
        users.add(sara);
        santaAssigner.assign(Sets.newHashSet(parker, cody, stephani, sara));
        System.out.println(users);
    }
}
